package mysql

import (
	"gorm.io/gorm"
	"time"
)

type UserList struct {
	Name        string    `gorm:"type: varchar(50); not null; primary_key" binding:"required" json:"name"`
	AuthGroup   string    `gorm:"type: varchar(20);" json:"auth_level"`
	Email       string    `gorm:"type: varchar(50); not null" binding:"required" json:"email"`
	Phone       string    `gorm:"type: varchar(20);" json:"phone"`
	Password    string    `gorm:"type: varchar(100); not null;" json:"password" binding:"required"`
	PasswordTry uint      `json:"password_try"`
	LockedUntil time.Time `json:"locked_until"`
	Status      string    `json:"status"`
}

type DiskList struct {
	gorm.Model
	Name     string `gorm:"type: varchar(50); not null" binding:"required" json:"name" `
	Level    string `gorm:"type: varchar(20);" json:"level"`
	Email    string `gorm:"type: varchar(50);" json:"email"`
	Phone    string `gorm:"type: varchar(20);" json:"phone"`
	Birthday string `gorm:"type: varchar(20);" json:"birthday"`
	Address  string `gorm:"type: varchar(200);" json:"address"`
}
